<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>教师风采</title>

    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/school_teacher_mein.css">
</head>

<body>
    <div id="container">
        <div class="contain">
            <div class="header">
                <div class="header_title">教师风采</div>
                <a onclick="history.back()">
                    <img src="image/return.png" alt="" class="return">
                </a>
            </div>
            <article class="khfxWarp header-after">
                <section class="khfxPane" id="vue-root">
                    <div class="teacher_content" v-for="item in list" :key="item.id">
                        <div class="photo">
                            <img v-if="item.pic" :src="getImg(item.pic)">
                        </div>
                        <div class="introduce">
                            <div class="teacher_intro">
                                <span class="teacher-name" v-text="item.name"></span>
                                <span v-text="item.level"></span>
                            </div>
                            <div class="introduce-container" v-text="item.intro"></div>
                            <div class="more">
                                <a :href="'school_teacher_details.html?id='+item.id">【查看详情】</a>
                            </div>
                        </div>
                    </div>
                </section>
            </article>
        </div>
    </div>

    <script src="/scriptZIP/vue.min.js"></script>
    <script src="/scriptZIP/axios.min.js"></script>

    <script src="/js/common.js"></script>

    <script>
        var app = new Vue({
            el: '#vue-root',
            data: {
                list: [],
                schoolId: getPerson().schoolId
            },
            created: function () {
                var url = isTeacher() ? '/t' : '/s';
                axios.get(url + '/teacherMien').then(function (res) {
                    this.list = res.data;
                }.bind(this));
            },
            methods: {
                getImg: function (pic) {
                    return '/static/' + this.schoolId + '/teacherMien/' + pic;
                }
            }
        });

        updateUnread('teacherMien');

    </script>

</body>

</html>